/* 基础样式 */
body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
        'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
        sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background-color: #f8f9fa;
}

code {
    font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
        monospace;
}

/* 应用容器 */
.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: all 0.3s ease;
}

/* 深色主题 */
.app-container.dark {
    background-color: #1a1a2e;
    color: #e2e2e2;
}

.app-container.dark .chat-window {
    background-color: #16213e;
}

.app-container.dark .message-bubble {
    background-color: #1f365d;
}

.app-container.dark .user .message-bubble {
    background-color: #385170;
}

.app-container.dark .system .message-bubble {
    background-color: #2a3950;
}

.app-container.dark .chat-input textarea {
    background-color: #1f365d;
    color: #e2e2e2;
    border: 1px solid #385170;
}

.app-container.dark .send-button {
    background-color: #385170;
    color: #e2e2e2;
}

.app-container.dark .upload-button {
    background-color: #385170;
    color: #e2e2e2;
}

.app-container.dark .session-item {
    background-color: #1f365d;
}

.app-container.dark .session-item.active {
    background-color: #385170;
}

.app-container.dark .btn {
    background-color: #385170;
    color: #e2e2e2;
    border: 1px solid #1f365d;
}

.app-container.dark .btn-outline-primary {
    border: 1px solid #385170;
}

.app-container.dark .btn-outline-primary:hover {
    background-color: #385170;
}

/* 导航栏 */
.app-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background-color: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.app-container.dark .app-nav {
    background-color: #16213e;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.nav-logo h1 {
    margin: 0;
    color: #333;
}

.app-container.dark .nav-logo h1 {
    color: #e2e2e2;
}

.nav-links {
    display: flex;
    gap: 1rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #333;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    transition: background-color 0.2s ease;
}

.app-container.dark .nav-link {
    color: #e2e2e2;
}

.nav-link:hover {
    background-color: #f0f0f0;
}

.app-container.dark .nav-link:hover {
    background-color: #1f365d;
}

.nav-link.active {
    background-color: #e0e0e0;
    font-weight: 500;
}

.app-container.dark .nav-link.active {
    background-color: #385170;
}

.theme-toggle {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: #333;
    padding: 0.5rem;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.app-container.dark .theme-toggle {
    color: #e2e2e2;
}

.theme-toggle:hover {
    background-color: #f0f0f0;
}

.app-container.dark .theme-toggle:hover {
    background-color: #1f365d;
}

/* 主内容区 */
.app-main {
    flex: 1;
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* 页脚 */
.app-footer {
    text-align: center;
    padding: 1rem;
    background-color: #ffffff;
    box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.1);
}

.app-container.dark .app-footer {
    background-color: #16213e;
    box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.2);
}

/* 聊天窗口 */
.chat-window {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 160px);
    background-color: #ffffff;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background-color: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
}

.app-container.dark .chat-header {
    background-color: #1f365d;
    border-bottom: 1px solid #385170;
}

.chat-title h2 {
    margin: 0;
    font-size: 1.2rem;
    color: #333;
}

.app-container.dark .chat-title h2 {
    color: #e2e2e2;
}

.session-info {
    font-size: 0.8rem;
    color: #666;
    margin-top: 0.2rem;
}

.chat-title h2 {
    margin: 0;
    font-size: 1.2rem;
    color: #333;
}

.app-container.dark .chat-title h2 {
    color: #e2e2e2;
}

.session-info {
    font-size: 0.8rem;
    color: #666;
    margin-top: 0.2rem;
}

.app-container.dark .session-info {
    color: #cccccc; /* 暗色主题下的会话信息文字颜色 */
}